import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)

import HomeContainer from '@/components/tabbar/HomeContainer'
import MemberContainer from '@/components/tabbar/MemberContainer'
import SearchContainer from '@/components/tabbar/SearchContainer'
import ShopcarContainer from '@/components/tabbar/ShopcarContainer'

/* 新闻列表 */
import NewsList from '@/components/news/NewsList'
import NewsInfo from '@/components/news/NewsInfo'

/* 图片列表 */
import PhotoList from '@/components/photos/PhotoList'
import PhotoInfo from '@/components/photos/PhotoInfo'

/* 商品列表 */
import GoodsList from '@/components/goods/GoodsList'
import GoodsInfo from '@/components/goods/GoodsInfo'

/* 商品评论 */
import GoodsComment from '@/components/goods/GoodsComment'
/* 图文介绍 */
import GoodsDesc from '@/components/goods/GoodsDesc'


export default new VueRouter({
  routes: [{
      path: '/',
      redirect: '/home'
    },
    {
      path: "/home",
      component: HomeContainer,
    },
    {
      path: "/member",
      component: MemberContainer
    },
    {
      path: "/shopcar",
      component: ShopcarContainer
    },
    {
      path: "/search",
      component:SearchContainer 
    },

    /* 跳转新闻列表 */
    {
      path: "/home/newslist",
      component: NewsList,
    },
    /* 新闻详情 */

    {
      path: "/home/newsInfo/:id",
      component: NewsInfo,
    },

    /* 图片列表 */
    {
      path: "/home/photolist",
      component: PhotoList,
    },

    /* 图片详情 */
    {
      path: "/home/photoinfo/:id",
      component: PhotoInfo,
    },
    /* 商品列表 */
    {
      path: "/home/goodsList",
      component: GoodsList,
    },
    /* 商品详情 */
    {
      path: "/home/goodsInfo/:id",
      name:"goodsInfo",
      component: GoodsInfo,
    },
    /* 商品图文介绍 */
    {
      path: "/home/goodsDesc/:id",
      name:"goodsDesc",
      component: GoodsDesc,
    },
    /* 商品评论 */
    {
      path: "/home/goodsComment/:id",
      name:"goodsComment",
      component: GoodsComment,
    },



  ],
  linkActiveClass: "mui-active"
})
